﻿@model LynxWiki.Models.RoleUsers

@{
    ViewBag.Title = "List Users In Role";
}

<h2>List Users In Role</h2>
<div><p>
    <span>Role: </span><span>@Model.AppRole</span>
     </p>
</div>

<table class="TableClass">
    <tr>
        <th class="TableCellHighlighted">User Name</th>
        <th class="TableCellHighlighted">Actions</th>
    </tr>
    @foreach (string user in Model.AppUsers) {
      <tr>
        <td class="TableCell">@user</td>
        <td class="TableCell">
            @using (Html.BeginForm("RemoveRoleFromUser", "UserRoles", FormMethod.Post, new { @class = "frmRemoveRoleFromUser", id = user + "_frmRemoveRoleFromUser" })) {
                @Html.Hidden("UserName", user)
                @Html.Hidden("Role", Model.AppRole)
                <input type="submit" name="btnRemoveRoleFromUser" class="btnRemoveRoleFromUser" value="Remove Role From User" />
            }
        </td>
      </tr>
    }
</table>
